#ifndef SEARCHWINDOW_H
#define SEARCHWINDOW_H

#include <assert.h>
#include <QMainWindow>
#include <QString>
#include <QMessageBox>
#include "ui_searchwindow.h"
#include <fstream>
#include <QDir>
#include "searchitem.h"

class SearchWindow : public QMainWindow
{
    Q_OBJECT
private:
    //variables
    std::vector<searchItem> searchItems;
    QString dir; //current working directory
    Ui_SearchWindow* uis;
public:
    //See the .cpp file for detailed method comments
    SearchWindow();
    ~SearchWindow();
    void startConnections(Ui_SearchWindow* UI);
    void searchAndShow(QString text);
    std::vector<searchItem> find(QString name, bool justFindName);
    void fillListWidget();
    void updateListWidget(QString text);
    void removeDuplicates();
    QString getImageName();
    QString getVideoName();

public slots:
    void typingFinished();
};

#endif // SEARCHWINDOW_H
